function calcOvertimeHours() {
	var list = new Array();
	var result = new Array();
	var items = $($('frame')[2].contentDocument.body).find(".word_break_Cell");
	var times = items.length / 13;

	for (let loopCount = 1; loopCount < times; loopCount++) {
		var item = new Object();
		for (let idx = loopCount * 13; idx < loopCount * 13 + 13; idx++) {
			let mod = idx % 13;
			switch (mod) {
				case 0:
					item.name = items[idx].innerText;
					break;
				case 1:
					item.date = items[idx].innerText;
					break;
				case 2:
					item.week = items[idx].innerText;
					break;
				case 3:
					item.rest = items[idx].innerText;
					break;
				case 6:
					item.workTime = items[idx].innerText;
					break;
				case 7:
					item.afterWorkTime = items[idx].innerText
					break;
				case 12:
					item.note = items[idx].innerText;
					break;
			}
		}
		list.push(item);
	}

	list.map(function (item) {
		if (item.workTime == "") {
			item.error = "上班时间为空";
			return;
		}
		if (item.afterWorkTime == "") {
			item.error = "下班时间为空";
			return;
		}
		let beginTime, endTime;
		if (item.rest == "休日") {
			// 未报备周末加班处理
			if (item.note.search("×") != -1) {
				return;
			}
			beginTime = new Date(item.date + " " + item.workTime);
		} else {
			let hours = parseInt(item.workTime.substr(0, 2));
			let min = parseInt(item.workTime.substr(3, 2));
			let vacate = false;

			if (hours >= 10) {
				if (hours == 10 && min == 0) {
					hours = 19;
				} else {
					hours = 18;
					vacate = true;
				}
			} else {
				if (hours < 9) {
					min = 0;
				}
				hours = 18;
			}
			let today = new Date(new Date(item.date));
			beginTime = new Date(today.getFullYear(), today.getMonth(), today.getDate(), hours, vacate ? 0 : min, 0, 0);
		}

		let worktimeHours = parseInt(item.workTime.substr(0, 2));
		let afterWorkHours = parseInt(item.afterWorkTime.substr(0, 2));

		if (afterWorkHours - worktimeHours < 0) {
			// 加班至凌晨处理
			let tommrowDate = new Date(new Date(item.date).getTime() + 24 * 60 * 60 * 1000);
			let afterWorkMin = parseInt(item.afterWorkTime.substr(3, 2));
			endTime = new Date(tommrowDate.getFullYear(), tommrowDate.getMonth(), tommrowDate.getDate(), afterWorkHours, afterWorkMin, 0, 0);
		} else {
			endTime = new Date(item.date + " " + item.afterWorkTime);
		}
		// 为报备加班处理
		if (item.note.search("×") != -1) {
			endTime = new Date(endTime.getFullYear(), endTime.getMonth(), endTime.getDate(), 21, 59, 0, 0);
		}
		// 加班时长(分钟)
		let overtime = endTime.getTime() - beginTime.getTime();
		item.overTime = Math.floor(overtime / 1000 / 60 / 60 / 0.25) * 0.25;

		// 工作日加班半小时后才有效
		if (item.overTime < 0.5 && item.rest == "") {
			return;
		}

		if (item.rest == "休日") {
			if (item.overTime >= 4 && item.overTime < 10) {
				item.meals = 12;
				item.overTime -= 0.5;
			} else if (item.overTime >= 10 && item.overTime < 14) {
				item.meals = 24;
				item.overTime -= 1;
			} else if (item.overTime >= 14 && item.overTime < 19) {
				item.meals = 36;
				item.overTime -= 1.5;
			} else if (item >= 19) {
				item.meals = 48;
				item.overTime -= 2;
			} else {
				item.meals = 0;
			}
		} else {
			// 加班餐补贴
			if (item.overTime >= 2.5 && item.overTime < 6) {
				item.meals = 12;
				item.overTime -= 0.5;
			} else if (item.overTime >= 6 && item.overTime < 11) {
				item.meals = 24;
				item.overTime -= 1;
			} else if (item >= 11) {
				item.meals = 36;
				item.overTime -= 1.5;
			} else {
				item.meals = 0;
			}
		}

		let beginHours = beginTime.getHours();
		let beginMin = beginTime.getMinutes();

		let endHours = endTime.getHours();
		let endMin = endTime.getMinutes();


		item.beginOverTime = (beginHours < 10 ? "0" + beginHours : beginHours) + ":" + (beginMin < 10 ? "0" + beginMin : beginMin);
		item.endOverTime = (endHours < 10 ? "0" + endHours : endHours) + ":" + (endMin < 10 ? "0" + endMin : endMin);
		result.push(item);
		console.log(beginTime.toLocaleTimeString() + "-" + endTime.toLocaleTimeString() + " 时长:" + item.overTime);
	});
	return result;
}